#include <limits.h>
#include "mycode.h"
#include "/home/seecs/Desktop/lab2/gtest-1.7.0/include/gtest/gtest.h"
#include "gtest/internal/gtest-internal.h"

TEST(AddTest, Blah) {
	int test_arr1[5][5] = {{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1}};
	int test_arr2[5][5] = {{1,2,3,4,5},{1,2,3,4,5},{1,2,3,4,5},{1,2,3,4,5},{1,2,3,4,5}};
	int expt_arr[5][5] = {{2,3,4,5,6},{2,3,4,5,6},{2,3,4,5,6},{2,3,4,5,6},{2,3,4,5,6}};

	matrix obj;
	int** result= obj.matrixAdd(test_arr1,test_arr2);

	for (int i=0; i<5; i++) {
		for (int j=0; j<5; j++) {
			EXPECT_EQ(result[i][j], expt_arr[i][j]);
		}
	}
}


TEST(SUBTRACTTest, Blah) {
	int test_arr1[5][5] = {{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1},{1,1,1,1,1}};
	int test_arr2[5][5] = {{3,3,3,3,3},{3,3,3,3,3},{3,3,3,3,3},{3,3,3,3,3},{3,3,3,3,3}};
	int expt_arr[5][5] = {{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2}};

	matrix obj;
	int** result= obj.matrixSubtract(test_arr1,test_arr2);

	for (int i=0; i<5; i++) {
		for (int j=0; j<5; j++) {
			EXPECT_EQ(result[i][j], expt_arr[i][j]);
		}
	}
}

TEST(MULTIPLYTest, Blah) {
	int test_arr1[5][5] = {{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2},{2,2,2,2,2}};
	int test_arr2[5][5] = {{1,2,3,4,5},{1,2,3,4,5},{1,2,3,4,5},{1,2,3,4,5},{1,2,3,4,5}};
	int expt_arr[5][5] = {{10,20,30,40,50},{10,20,30,40,50},{10,20,30,40,50},{10,20,30,40,50},{10,20,30,40,50}};

	matrix obj;
	int** result= object.matrixMultiply(test_arr1,test_arr2);

	for (int i=0; i<5; i++) {
		for (int j=0; j<5; j++) {
			EXPECT_EQ(result[i][j], expt_arr[i][j]);
		}
	}
}

